package com.ostrich.a2104gao5.test23

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/17 13:25
 * @Description : IUnchanged
 * 不变：默认的既能作为输入参数，也能作为返回值
 */
interface IUnchanged<T> {
    fun originally():T
    fun originally(item:T)
}

class BigStore:IUnchanged<String>{
    override fun originally(): String {
        return "实现泛型接口  不变---返回类型"
    }

    override fun originally(item: String) {
        println("------------不变---传参 ---=="+item)
    }

}

fun  main(){
    var iUnchanged=BigStore()
    println(iUnchanged.originally())
    println(iUnchanged.originally("参数"))
}